home *** CD-ROM | disk | FTP | other *** search
/ More SimCities / More SimCities (1997).iso / sc / tools / simutil / simutil.pas < prev   
Pascal/Delphi Source File  |  1997-06-17  |  5KB  |  135 lines

  1. Program SimUtil;
  2. {
  3.   Reads a SimCity .CTY file, reports its various parameters.
  4.   This is just a sample of what can be done with the SimUnit.
  5. }
  6.  
  7. Uses
  8.   TpCrt,
  9.   SimUnit;
  10.  
  11. Var
  12.   Population : LongInt;
  13.   CityTime   : LongInt;
  14.   i          : Byte;
  15.  
  16. begin
  17.   FillChar(SimCityRecord, SizeOf(SimCityRecord), 0);
  18.   Clrscr;
  19.   Write('Enter SimCity filename: ');
  20.   Readln(SimCityFname);                  {careful NO error checking here}
  21.   if length(SimCityFname) = 0 then halt;
  22.   Writeln;
  23.   Writeln('Please Wait a Moment While I Calculate....');
  24.   ReadSimCityFile;
  25.   MapTileIndexValues;
  26.   Clrscr;
  27.   With SimCityRecord do
  28.     begin
  29.       Write('City Name: ');
  30.       for i := 3 to 63 do Write(CityName[i]);
  31.       writeln(cityname[64]);
  32.       With MiscVar do
  33.         begin
  34.           Writeln('External Market Size: ',ExtMktSize);
  35.           Writeln('Res Pop: ', ResPop*20);
  36.           Writeln('Com Pop: ', ComPop*8*20);
  37.           Writeln('Ind Pop: ', IndPop*8*20);
  38.           Population := (ResPop + (ComPop*8) + (IndPop*8));
  39.           Population := Population * 20;
  40.           Writeln('Population: ', population);
  41.           Writeln('City Time : ', (CityTime/48 + 1900):4:4);
  42.           Writeln('Land Value Average: ', LandValAvg);
  43.           Writeln('Crime Average     : ', CrimeAvg);
  44.           Writeln('Pollution Average : ', PollutionAvg);
  45.           Writeln('Game Level: ',GameLevel);
  46.           Writeln('City Class: ',CityClass);
  47.           Writeln('City Score: ',CityScore);
  48.           Writeln('Total Funds  : $',TotalFunds);
  49.           Writeln('City Tax Rate: ',TaxRate,'%');
  50.           Writeln('Police Budget: ',PoliceBudget);
  51.           Writeln('Fire Budget  : ',FireBudget);
  52.           Writeln('Road Budget  : ',RoadBudget);
  53.           Writeln('FLAGS');
  54.           Writeln('  Auto-Bulldozer: ',AutoBull);
  55.           Writeln('  Auto-Budget   : ',AutoBudget);
  56.           Writeln('  Auto-Goto     : ',AutoGo);
  57.           Writeln('  Sound         : ',SoundEffects);
  58.           Writeln('  Speed         : ',SimSpeed);
  59.         end;
  60.     end;
  61.     With MapRecord do
  62.       begin
  63.         GotoXY(35,2);
  64.         Write('Hospitals : ', Hospital);
  65.         GotoXY(35,3);
  66.         Write('Churchs   : ', Church);
  67.         GotoXY(35,4);
  68.         Write('Airports  : ', Airport);
  69.         GotoXY(35,5);
  70.         Write('Seaports  : ', SeaPort);
  71.         GotoXY(35,6);
  72.         Write('Coal Power: ', CoalPower);
  73.         GotoXY(35,7);
  74.         Write('Nuclear   : ', NuclearPower);
  75.         GotoXY(35,8);
  76.         Write('Parks     : ', Parks);
  77.         GotoXY(35,9);
  78.         Write('Fountains : ', Fountain);
  79.         GotoXY(35,10);
  80.         Write('Fire Stations  : ',FireStation);
  81.         GotoXY(35,11);
  82.         Write('Police Stations: ',PoliceStation);
  83.         GotoXY(35,12);
  84.         Write('Trees Areas    : ',Trees + TreeEdge);
  85.         GotoXY(35,13);
  86.         Write('Empty Residential Areas       : ',EmptyRes);
  87.         GotoXY(35,14);
  88.         Write('Lo Value Residential Units    : ',ResLoVal1+ResLoVal2+ResLoVal3+ResLoVal4);
  89.         GotoXY(35,15);
  90.         Write('Mid/Up Value Residential Units: ',ResMidVal1+ResMidVal2+ResMidVal3+ResMidVal4+
  91.                                                    ResUpVal1+ResUpVal2+ResUpVal3+ResUpVal4);
  92.         GotoXY(35,16);
  93.         Write('Hi Value Residential Units    : ',ResHiVal1+ResHiVal2+ResHiVal3+ResHiVal4);
  94.         GotoXY(35,17);
  95.         Write('Total Number of Houses        : ', Houses);
  96.         GotoXY(35,18);
  97.         Write('Empty Commerical Zones        : ',EmptyCom);
  98.         GotoXY(35,19);
  99.         Write('Lo Value Commerical Zones     : ',ComLoVal1+ComLoVal2+ComLoVal3+ComLoVal4+ComLoVal5);
  100.         GotoXY(35,20);
  101.         Write('Mid/Up Value Commerical Zones : ',ComMidVal1+ComMidVal2+ComMidVal3+ComMidVal4+ComMidVal5+
  102.                                                ComUpVal1+ComUpVal2+ComUpVal3+ComUpVal4+ComUpVal5);
  103.         GotoXY(35,21);
  104.         Write('Hi Value Commercial Zones     : ',ComHiVal1+ComHiVal2+ComHiVal3+ComHiVal4+ComHiVal5);
  105.         GotoXY(35,22);
  106.         Write('Empty Industrial Zones        : ',IndEmpty);
  107.         GotoXY(35,23);
  108.         Write('Lo Value Industrial Zones     : ',IndLoVal1+IndLoVal2+IndLoVal3+IndLoVal4);
  109.         GotoXY(35,24);
  110.         Write('Hi Value Industrial Zones     : ',IndHiVal1+IndHiVal2+IndHiVal3+IndHiVal4);
  111.         GotoXY(55,2);
  112.         Write('Power Tiles  : ',Power);
  113.         GotoXY(55,3);
  114.         Write('Road (Heavy) : ',Road_HvTraf);
  115.         GotoXY(55,4);
  116.         Write('Road (Light) : ',Road_LtTraf);
  117.         GotoXY(55,5);
  118.         Write('Road (NoTraf): ',Road_NoTraf);
  119.         GotoXY(55,6);
  120.         Write('Transit Lines: ',Transit);
  121.         GotoXY(55,7);
  122.         Write('Rad. Zones   : ',Radiation);
  123.         GotoXY(55,8);
  124.         Write('Stadiums     : ',StadiumEmpty+StadiumFull);
  125.         GotoXY(55,9);
  126.         Write('River Fronts : ',RiverEdge);
  127.       end;
  128.     Readln;
  129. end.
  130.  
  131.  
  132.  
  133.  
  134.  
  135.